package com.yiyi.credit.manage.model.vo;

import com.alibaba.fastjson.annotation.JSONField;
import com.yiyi.credit.manage.abutment.common.enums.ProductStatus;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;


@ApiModel
public class SubProductVo implements Serializable {

    @ApiModelProperty("站点产品Id")
    private Long id;

    @ApiModelProperty("站点产品编号")
    private String productNo;

    @ApiModelProperty("站点产品名称")
    private String subProductName;

    @ApiModelProperty("所属主站产品名称")
    private String mainProductName;

    @ApiModelProperty("封闭期限")
    private Integer closedPeriod;

    @ApiModelProperty("封闭期限单位（1，天，2，月）")
    private Integer closedPeriodUnit;

    @ApiModelProperty("产品期限")
    private Integer productPeriod;

    @ApiModelProperty("产品期限单位（1，天，2，月）")
    private Integer productPeriodUnit;

    @ApiModelProperty("起投金额")
    private BigDecimal mainLowInvestAmount;

    @ApiModelProperty("递增金额")
    private BigDecimal mainIncreaseAmount;

    private Long mainAddTime;

    @ApiModelProperty("站点产品添加时间")
    private Long addTime;

    @ApiModelProperty("添加时间")
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    private Date mainAddTimeDate;

    private Long publishTime;

    @ApiModelProperty("发布时间")
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    private Date publishTimeDate;

    private Long shelveTime;

    @ApiModelProperty("下架时间")
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    private Date shelveTimeDate;

    private Integer status;

    @ApiModelProperty("状态")
    private String statusDesc;

    @ApiModelProperty("退回原因")
    private String toBackReason;

    private Long createPeople;

    @ApiModelProperty("添加人")
    private String addPeople;

    @ApiModelProperty("产品类型（1：集合标，2：散标）")
    private Integer type;

    @ApiModelProperty("主站散标-金额范围（最大值）")
    private BigDecimal highAmount;

    @ApiModelProperty("主站散标-金额范围（最小值）")
    private BigDecimal lowAmount;

    @ApiModelProperty("主站散标-收益范围（最大值）")
    private BigDecimal highRate;

    @ApiModelProperty("主站散标-收益范围（最小值）")
    private BigDecimal lowRate;

    @ApiModelProperty("主站散标-最小产品期限")
    private Integer productLowPeriod;

    @ApiModelProperty("主站散标-最大产品期限）")
    private Integer productHighPeriod;

    @ApiModelProperty("主站产品期限单位（1：天，2：月）")
    private Integer mainProductPeriodUnit;

    @ApiModelProperty("未匹配金额")
    private BigDecimal notMatchAmount;

    @ApiModelProperty("已匹配金额")
    private BigDecimal alreadyMatchAmount;

    @ApiModelProperty("已释放金额")
    private BigDecimal releasedAmount;


    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getProductNo() {
        return productNo;
    }

    public void setProductNo(String productNo) {
        this.productNo = productNo;
    }

    public String getSubProductName() {
        return subProductName;
    }

    public void setSubProductName(String subProductName) {
        this.subProductName = subProductName;
    }

    public String getMainProductName() {
        return mainProductName;
    }

    public void setMainProductName(String mainProductName) {
        this.mainProductName = mainProductName;
    }

    public BigDecimal getMainLowInvestAmount() {
        return mainLowInvestAmount;
    }

    public void setMainLowInvestAmount(BigDecimal mainLowInvestAmount) {
        this.mainLowInvestAmount = mainLowInvestAmount;
    }

    public BigDecimal getMainIncreaseAmount() {
        return mainIncreaseAmount;
    }

    public void setMainIncreaseAmount(BigDecimal mainIncreaseAmount) {
        this.mainIncreaseAmount = mainIncreaseAmount;
    }

    public Long getMainAddTime() {
        return mainAddTime;
    }

    public void setMainAddTime(Long mainAddTime) {
        this.setMainAddTimeDate(new Date(mainAddTime));
        this.mainAddTime = mainAddTime;
    }

    public Date getMainAddTimeDate() {
        return mainAddTimeDate;
    }

    public void setMainAddTimeDate(Date mainAddTimeDate) {
        this.mainAddTimeDate = mainAddTimeDate;
    }

    public Long getPublishTime() {
        return publishTime;
    }

    public void setPublishTime(Long publishTime) {
        this.setPublishTimeDate(new Date(publishTime));
        this.publishTime = publishTime;
    }

    public Date getPublishTimeDate() {
        return publishTimeDate;
    }

    public void setPublishTimeDate(Date publishTimeDate) {
        this.publishTimeDate = publishTimeDate;
    }

    public Long getShelveTime() {
        return shelveTime;
    }

    public void setShelveTime(Long shelveTime) {
        this.setShelveTimeDate(new Date(shelveTime));
        this.shelveTime = shelveTime;
    }

    public Date getShelveTimeDate() {
        return shelveTimeDate;
    }

    public void setShelveTimeDate(Date shelveTimeDate) {
        this.shelveTimeDate = shelveTimeDate;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.setStatusDesc(ProductStatus.getEnumByKey(status).getValue());
        this.status = status;
    }

    public String getStatusDesc() {
        return statusDesc;
    }

    public void setStatusDesc(String statusDesc) {
        this.statusDesc = statusDesc;
    }

    public String getToBackReason() {
        return toBackReason;
    }

    public void setToBackReason(String toBackReason) {
        this.toBackReason = toBackReason;
    }

    public Long getCreatePeople() {
        return createPeople;
    }

    public void setCreatePeople(Long createPeople) {
        this.createPeople = createPeople;
    }

    public String getAddPeople() {
        return addPeople;
    }

    public void setAddPeople(String addPeople) {
        this.addPeople = addPeople;
    }

    public Integer getClosedPeriod() {
        return closedPeriod;
    }

    public void setClosedPeriod(Integer closedPeriod) {
        this.closedPeriod = closedPeriod;
    }

    public Integer getClosedPeriodUnit() {
        return closedPeriodUnit;
    }

    public void setClosedPeriodUnit(Integer closedPeriodUnit) {
        this.closedPeriodUnit = closedPeriodUnit;
    }

    public Integer getProductPeriod() {
        return productPeriod;
    }

    public void setProductPeriod(Integer productPeriod) {
        this.productPeriod = productPeriod;
    }

    public Integer getProductPeriodUnit() {
        return productPeriodUnit;
    }

    public void setProductPeriodUnit(Integer productPeriodUnit) {
        this.productPeriodUnit = productPeriodUnit;
    }

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    public BigDecimal getHighAmount() {
        return highAmount;
    }

    public void setHighAmount(BigDecimal highAmount) {
        this.highAmount = highAmount;
    }

    public BigDecimal getLowAmount() {
        return lowAmount;
    }

    public void setLowAmount(BigDecimal lowAmount) {
        this.lowAmount = lowAmount;
    }

    public BigDecimal getHighRate() {
        return highRate;
    }

    public void setHighRate(BigDecimal highRate) {
        this.highRate = highRate;
    }

    public BigDecimal getLowRate() {
        return lowRate;
    }

    public void setLowRate(BigDecimal lowRate) {
        this.lowRate = lowRate;
    }

    public Integer getProductLowPeriod() {
        return productLowPeriod;
    }

    public void setProductLowPeriod(Integer productLowPeriod) {
        this.productLowPeriod = productLowPeriod;
    }

    public Integer getProductHighPeriod() {
        return productHighPeriod;
    }

    public void setProductHighPeriod(Integer productHighPeriod) {
        this.productHighPeriod = productHighPeriod;
    }

    public Long getAddTime() {
        return addTime;
    }

    public void setAddTime(Long addTime) {
        this.addTime = addTime;
    }

    public Integer getMainProductPeriodUnit() {
        return mainProductPeriodUnit;
    }

    public void setMainProductPeriodUnit(Integer mainProductPeriodUnit) {
        this.mainProductPeriodUnit = mainProductPeriodUnit;
    }

    public BigDecimal getNotMatchAmount() {
        return notMatchAmount;
    }

    public void setNotMatchAmount(BigDecimal notMatchAmount) {
        this.notMatchAmount = notMatchAmount;
    }

    public BigDecimal getAlreadyMatchAmount() {
        return alreadyMatchAmount;
    }

    public void setAlreadyMatchAmount(BigDecimal alreadyMatchAmount) {
        this.alreadyMatchAmount = alreadyMatchAmount;
    }

    public BigDecimal getReleasedAmount() {
        return releasedAmount;
    }

    public void setReleasedAmount(BigDecimal releasedAmount) {
        this.releasedAmount = releasedAmount;
    }
}
